﻿using global::GoGameClient.script.global;
using Godot;

namespace GoGameClient.script.resources;

public class SpriteResources : IResources
{
    private string _path = ResourcesControl.RootPath + "role/";
    private readonly SpriteFrames _spriteFrames;
    
    public SpriteResources(string name)
    {
        _spriteFrames = GD.Load<SpriteFrames>($"{_path}/{name}/模型/default.tres");
    }
    

    public SpriteFrames GetSpriteFrames()
    {
        return _spriteFrames;
    }

    public string GetPath()
    {
        return _path;
    }

    public void SetPath(string path)
    {
        _path = ResourcesControl.RootPath + path;
    }
}